import { Component, OnInit } from '@angular/core';
import { Lesson6ServiceService } from '../lesson6-service.service';

@Component({
  selector: 'app-lesson6-two',
  templateUrl: './lesson6-two.component.html',
  styleUrls: ['./lesson6-two.component.scss']
})
export class Lesson6TwoComponent implements OnInit {

  checkAll = false;

  constructor(public lesson6Servic: Lesson6ServiceService) {
  }

  ngOnInit() {
  }
  move() {
    this.lesson6Servic.RTL();
  }
  checkAllFn() {
    this.lesson6Servic.rightData.forEach(element => {
      element.check = !this.checkAll;
    });
    this.checkAll = !this.checkAll;
  }
}
